<page-header [title]="'添加订单'">
    <ng-template #breadcrumb>
        <nz-breadcrumb>
            <nz-breadcrumb-item>基本信息</nz-breadcrumb-item>
            <nz-breadcrumb-item><a [routerLink]="['/prod/product']">基本资料</a></nz-breadcrumb-item>
        </nz-breadcrumb>
    </ng-template>
    <ng-template #action><button nz-button (click)="back()"style="float: right"><i class="anticon anticon-rollback" style="font-size: 14px"></i>返回订单列表</button></ng-template>
</page-header>
<nz-spin [nzSpinning]="loading">
    <nz-card nzTitle="基本信息" [nzExtra]="extraTemplate">
        <form nz-form>
            <nz-form-item>
                <nz-form-label nzSpan="2" nzRequired>品项</nz-form-label>
                <nz-form-control nzSpan="4">
                    <nz-select style="" [(ngModel)]="product.brandLine" name="brandLine" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择品项'">
                        <nz-option [nzLabel]="brand.text" [nzValue]="brand.value" *ngFor="let brand of brandLines"></nz-option>
                    </nz-select>
                </nz-form-control>

                <nz-form-label nzSpan="2" nzRequired>分类</nz-form-label>
                <nz-form-control nzSpan="4">
                    <nz-select style="" [(ngModel)]="product.category" name="category" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择分类'">
                        <nz-option [nzLabel]="category.text" [nzValue]="category.value" *ngFor="let category of categorys"></nz-option>
                    </nz-select>
                </nz-form-control>

                <nz-form-label nzSpan="2" nzRequired>品牌</nz-form-label>
                <nz-form-control nzSpan="4">
                    <nz-select style="" [(ngModel)]="product.brand" name="brand" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择品牌'">
                        <nz-option [nzLabel]="brand.text" [nzValue]="brand.value" *ngFor="let brand of brands"></nz-option>
                    </nz-select>
                </nz-form-control>

                <nz-form-label nzSpan="2" nzRequired>产品季</nz-form-label>
                <nz-form-control nzSpan="4">
                    <nz-select style="" [(ngModel)]="product.season" name="season" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择产品季'">
                        <nz-option [nzLabel]="season.text" [nzValue]="season.value" *ngFor="let season of seasons"></nz-option>
                    </nz-select>
                </nz-form-control>

                <nz-form-label nzSpan="2" nzRequired>年份</nz-form-label>
                <nz-form-control nzSpan="4">
                    <nz-select style="" [(ngModel)]="product.year" name="year" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择年份'">
                        <nz-option [nzLabel]="year.text" [nzValue]="year.value" *ngFor="let year of years"></nz-option>
                    </nz-select>
                </nz-form-control>

                <nz-form-label nzSpan="2" nzRequired>款式</nz-form-label>
                <nz-form-control nzSpan="4">
                    <nz-select style="" [(ngModel)]="product.userGroup" name="userGroup" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择款式'">
                        <nz-option [nzLabel]="userGroup.text" [nzValue]="userGroup.value" *ngFor="let userGroup of userGroups"></nz-option>
                    </nz-select>
                </nz-form-control>

                <nz-form-label nzSpan="2">广告款</nz-form-label>
                <nz-form-control nzSpan="4">
                    <nz-select  [(ngModel)]="product.isAd" name="isAd" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择'">
                        <nz-option [nzLabel]="cm.text" [nzValue]="cm.value" *ngFor="let cm of isAds"></nz-option>
                    </nz-select>
                </nz-form-control>

                <nz-form-label nzSpan="2">定制</nz-form-label>
                <nz-form-control nzSpan="4">
                    <nz-select style="" [(ngModel)]="product.isCm" name="isCm" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择'">
                        <nz-option [nzLabel]="cm.text" [nzValue]="cm.value" *ngFor="let cm of isCms"></nz-option>
                    </nz-select>
                </nz-form-control>

            </nz-form-item>
        </form>
    </nz-card>

  <nz-card nzTitle="行驶证信息" [nzExtra]="extraxsTemplate">
    <form nz-form>
      <nz-form-item>
        <nz-form-label nzSpan="2" nzRequired>品项</nz-form-label>
        <nz-form-control nzSpan="4">
          <nz-select style="" [(ngModel)]="product.brandLine" name="brandLine" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择品项'">
            <nz-option [nzLabel]="brand.text" [nzValue]="brand.value" *ngFor="let brand of brandLines"></nz-option>
          </nz-select>
        </nz-form-control>

        <nz-form-label nzSpan="2" nzRequired>分类</nz-form-label>
        <nz-form-control nzSpan="4">
          <nz-select style="" [(ngModel)]="product.category" name="category" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择分类'">
            <nz-option [nzLabel]="category.text" [nzValue]="category.value" *ngFor="let category of categorys"></nz-option>
          </nz-select>
        </nz-form-control>

        <nz-form-label nzSpan="2" nzRequired>品牌</nz-form-label>
        <nz-form-control nzSpan="4">
          <nz-select style="" [(ngModel)]="product.brand" name="brand" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择品牌'">
            <nz-option [nzLabel]="brand.text" [nzValue]="brand.value" *ngFor="let brand of brands"></nz-option>
          </nz-select>
        </nz-form-control>

        <nz-form-label nzSpan="2" nzRequired>产品季</nz-form-label>
        <nz-form-control nzSpan="4">
          <nz-select style="" [(ngModel)]="product.season" name="season" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择产品季'">
            <nz-option [nzLabel]="season.text" [nzValue]="season.value" *ngFor="let season of seasons"></nz-option>
          </nz-select>
        </nz-form-control>

        <nz-form-label nzSpan="2" nzRequired>年份</nz-form-label>
        <nz-form-control nzSpan="4">
          <nz-select style="" [(ngModel)]="product.year" name="year" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择年份'">
            <nz-option [nzLabel]="year.text" [nzValue]="year.value" *ngFor="let year of years"></nz-option>
          </nz-select>
        </nz-form-control>

        <nz-form-label nzSpan="2" nzRequired>款式</nz-form-label>
        <nz-form-control nzSpan="4">
          <nz-select style="" [(ngModel)]="product.userGroup" name="userGroup" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择款式'">
            <nz-option [nzLabel]="userGroup.text" [nzValue]="userGroup.value" *ngFor="let userGroup of userGroups"></nz-option>
          </nz-select>
        </nz-form-control>

        <nz-form-label nzSpan="2">广告款</nz-form-label>
        <nz-form-control nzSpan="4">
          <nz-select  [(ngModel)]="product.isAd" name="isAd" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择'">
            <nz-option [nzLabel]="cm.text" [nzValue]="cm.value" *ngFor="let cm of isAds"></nz-option>
          </nz-select>
        </nz-form-control>

        <nz-form-label nzSpan="2">定制</nz-form-label>
        <nz-form-control nzSpan="4">
          <nz-select style="" [(ngModel)]="product.isCm" name="isCm" nzAllowClear nzShowSearch [nzPlaceHolder]="'请选择'">
            <nz-option [nzLabel]="cm.text" [nzValue]="cm.value" *ngFor="let cm of isCms"></nz-option>
          </nz-select>
        </nz-form-control>

      </nz-form-item>
    </form>
  </nz-card>

    <nz-card nzTitle="文件信息-点击加号添加">
        <form nz-form>
          <nz-row [nzGutter]="64">
          <nz-col [nzSpan]="8">

            <nz-upload class="avatar-uploader"
                       [nzAction]="uploadUrl"
                       [nzData]="avatarParam"
                       nzName="file"
                       [nzShowUploadList]="false"
                       [nzBeforeUpload]="beforeUpload"
                       (nzChange)="handleChange($event)">
              <i *ngIf="!avatarUrl" class="anticon anticon-plus avatar-uploader-trigger"></i>
              <img *ngIf="avatarUrl" [src]="avatarUrl" class="avatar">
            </nz-upload>
          </nz-col>
          </nz-row>

          <!--<nz-form-item>-->
                <!--<nz-form-label nzSpan="2">文件</nz-form-label>-->
                <!--<nz-form-control nzXs="24" nzSm="12" nzMd="22">-->
                    <!--<nz-switch name="salestatus" [(ngModel)]="saleing" nzCheckedChildren="上架" nzUnCheckedChildren="下架"></nz-switch>-->
                <!--</nz-form-control>-->
            <!--</nz-form-item>-->
        </form>
    </nz-card>
</nz-spin>
<footer-toolbar errorCollect>
    <button nz-button type="primary" nzType="primary"  [nzLoading]="loading" (click)="save()">保存</button>
</footer-toolbar>
